<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <p>
      {{ $route.params.color}}
    </p>
    <button @click="getParam">get param</button>
    <router-view></router-view>
  </div>
</template>

<script>
  export default{
    name:'hello',
    data(){
      return{
        msg:'i am  red apple'
      }
    },
    methods:{
      getParam(){
        console.log(this.$router.paams)

      }
    }
  }
</script>
